﻿using Assets.Scripts.Interface;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
/// <summary>
/// 用于主角暂停前进的能力
/// </summary>
public class JackProp : AProp
{
    [Tooltip("获取移动脚本")]
    public MoveControl mControl;
    [SerializeField, Tooltip("是否停止物体的旋转")]
    public bool enableRotate;
    public override void Click()
    {
        if (mControl.IsReBound == false)
        {
            GameManager.Instance.Stop(mControl, enableRotate);
            ReduceCount(1);
        }
    }//点击事件

    public override void FixedAwake()
    {
       
    }//初始化
    /// <summary>
    /// 被主角拾取的逻辑
    /// </summary>
    /// <param name="other"></param>
    protected override void OnTriggerEnter(Collider other)
    {
        base.OnTriggerEnter(other);
        mControl = other.GetComponent<MoveControl>();
    }

}
